/*
	[{"date":"2015-12-1", "temperature":"37.5"}, ...] => customerDateTemperatureMap(date, temperature)
	类似的有与日期相关的其他key-value Map
	依赖于MapUtil.js
*/
  
  function getCustomerDateArray(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateArray = new Array();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++)
		customerDateArray[i] = tempJSONArray[i].date;
    
    return customerDateArray;
  }
  
  function getDateTemperatureMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateTemperatureMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerTemperature = tempJSONArray[i].temperature;
  		
  		customerDateTemperatureMap.put(customerDate, customerTemperature);
    }
    
    return customerDateTemperatureMap;
  }
  
  function getDatePeriodMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDatePeriodMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerPeriod = tempJSONArray[i].period;
  		
  		customerDatePeriodMap.put(customerDate, customerPeriod);
    }
    
    return customerDatePeriodMap;
  }
  
  function getDateHeartMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateHeartMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerHeart = tempJSONArray[i].heart;
  		
  		customerDateHeartMap.put(customerDate, customerHeart);
    }
    
    return customerDateHeartMap;
  }
  
  function getDateMoonMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateMoonMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerMoon = tempJSONArray[i].moon;
  		
  		customerDateMoonMap.put(customerDate, customerMoon);
    }
    
    return customerDateMoonMap;
  }
  
  function getDateMedicineMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateMedicineMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerMedicine = tempJSONArray[i].medicine;
  		
  		customerDateMedicineMap.put(customerDate, customerMedicine);
    }
    
    return customerDateMedicineMap;
  }
  
  function getDatePlaneMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDatePlaneMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerPlane = tempJSONArray[i].plane;
  		
  		customerDatePlaneMap.put(customerDate, customerPlane);
    }
    
    return customerDatePlaneMap;
  }
  
  function getDateDrinkMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateDrinkMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerDrink = tempJSONArray[i].drink;
  		
  		customerDateDrinkMap.put(customerDate, customerDrink);
    }
    
    return customerDateDrinkMap;
  }
  
  function getDateMucusMap(str){
  	var tempJSONArray = JSON.parse(str);
  	var tempJSONArrayLen = tempJSONArray.length;
  	var customerDateMucusMap = new Map();
  	
  	for(var i = 0; i < tempJSONArrayLen; i ++){
		customerDate = tempJSONArray[i].date;
  		customerMucus = tempJSONArray[i].mucus;
  		
  		customerDateMucusMap.put(customerDate, customerMucus);
    }
    
    return customerDateMucusMap;
  }